﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace quanlysinhvien
{
    class people : student
    {
        student stu = new student();
        private long CMND;
        private string DIACHI;
        private bool GT;
        //contraction
        public void ppl()
        {
            CMND = 264373237;
            DIACHI = "Ninh Thuan";
            GT = true;
        }

        public void ppl(people pl)
        {
            long cmnd = pl.CMND;
            string diachi = pl.DIACHI;
            bool gt = pl.GT;
        }

        public void ppl(long cmnd, string diachi, bool gt)
        {
            CMND = cmnd;
            DIACHI = diachi;
            GT = gt;
        }

        public long CMNDPEOPLE
        {
            get
            {
                return CMND;
            }
            set
            {
                CMND = value;
            }
        }

        public string DIACHIPEOPLE
        {
            get {
                return DIACHI;
            }
            set {
                DIACHI = value;
            }
        }

        public bool GTPEOPLE
        {
            get {
                return GT;
            }
            set {
                GT = value;
            }
        }

        public void input()
        {
            stu.input();
            Console.WriteLine("Nhap so chung minh nhan dan: {0}" + CMND);
            CMND = long.Parse(Console.ReadLine());
            Console.WriteLine("Nhap dia chỉ: ");
            DIACHI = Console.ReadLine();
            Console.WriteLine("Gioi tinh:(nam:1 nu:0){0}");
            int gt = int.Parse(Console.ReadLine());
            while (gt < 0 || gt > 1)
            {
                Console.WriteLine("nhap chua dung gioi tinh!!!");
                gt = int.Parse(Console.ReadLine());
            }
            if (gt == 1)
                GT = true;
            else
                GT = false;
        }

        public void show()
        {
            stu.showst();
            string s;
            if(GT==true)
                s="Nam";
            else
                s="Nu";
            Console.WriteLine("Chung minh nhan dan: {0}" + CMND);
            Console.WriteLine("Dia chi: {0}" + DIACHI);
            Console.WriteLine("Gioi Tinh: {0}" + s);
        }
    }
}
